home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.5 KB | 55 lines | [TEXT/GEOL] |
- Item 2643453 8-Sept-90 00:36PDT
-
- From: D6020 Info Research, John MacVeigh,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: RE: gTarget and text views
-
- Mark,
-
- You didn't say if these views are all within a TDialogView or not. If not, then
- the TEditText won't work. If so, then you have to Override the TTEView's
- DoMouseCommand as follows:
-
- {$S ASelCommand}
- Function TMyTTEView.DoMouseCommand (Var theMouse: Point; Var Info: EventInfo;
- Var Hysteresis: Point): TCommand; OVERRIDE;
-
- Var aDialogView: TMyDialog;
-
- Begin
- If gTarget = Self
- Then DoMouseCommand := INHERITED DoMouseCommand (theMouse, Info, Hysteresis)
-
- Else Begin
- aDialogView := TMyDialog(GetDialogView);
- If aDialogView = Nil
- Then Begin
- {$IFC qDebug}
- Writeln ('TMyTextView is NOT in a dialog.');
- {$ENDC}
- DoMouseCommand := gNoChanges
- End
- Else Begin
- aDialogView.DoSelectEditText (Nil, False); {attempt to deselect current
- edit text}
- If aDialogview.fCurrentEditText <> Nil {failed}
- Then DoMouseCommand := gNoChanges
- Else Begin
- GetWindow.SetTarget (Self);
- DoMouseCommand := INHERITED DoMouseCommand (theMouse, Info, Hysteresis)
- End
- End
- End
- End; {TMyTTEView.DoMouseCommand}
-
- Checking back through FrameWorks, I see that I got this from Tommi at Kopfwerk;
- and neither of us wanted to put the TTEView into the tabbing sequence, so
- you'll have to work that out yourself.
-
- Hope this helps,
- --John MacVeigh
-
-
-